import 'package:json_annotation/json_annotation.dart';
import 'common_mode.dart';
part 'message_model.g.dart';


@JsonSerializable()
class MessageModel extends Object {

  @JsonKey(name: 'id')
  String id;

  @JsonKey(name: 'inputs')
  List<Inputs> inputs;

  @JsonKey(name: 'content')
  List<PipeAlbumMessageModel>? content;

  @JsonKey(name: 'createdTime')
  String createdTime;

  MessageModel(this.id,this.inputs,this.content,this.createdTime);

  factory MessageModel.fromJson(Map<String, dynamic> srcJson) => _$MessageModelFromJson(srcJson);

  Map<String, dynamic> toJson() => _$MessageModelToJson(this);

}


@JsonSerializable()
class Inputs extends Object {

  @JsonKey(name: 'val')
  String val;

  @JsonKey(name: 'name')
  String name;

  @JsonKey(name: 'show')
  bool show;

  @JsonKey(name: 'type')
  String type;

  Inputs(this.val,this.name,this.show,this.type,);

  factory Inputs.fromJson(Map<String, dynamic> srcJson) => _$InputsFromJson(srcJson);

  Map<String, dynamic> toJson() => _$InputsToJson(this);

}


